package com.qiangesoft.im.pojo.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 消息
 * </p>
 *
 * @author qiangesoft
 * @date 2024-02-07
 */
@Data
@ApiModel(value = "消息")
public class ImMessageVO implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "消息id")
    private Long id;

    @ApiModelProperty(value = "会话id")
    private Long chatId;

    @ApiModelProperty(value = "发送者id")
    private Long senderId;

    @ApiModelProperty(value = "发送者")
    private SysUserVo sender;

    @ApiModelProperty(value = "消息类型：01-系统、02-文本、03-图片、04-音频、05-视频")
    private String messageType;

    @ApiModelProperty(value = "消息")
    private String message;

    @ApiModelProperty(value = "是否已读")
    private Boolean readFlag;

    @JsonFormat(pattern = "yyyy-mm-dd HH:mm:ss")
    @ApiModelProperty(value = "发言时间")
    private Date sendTime;
}
